<html lang="en" xml:lang="en"><head>
<META http-equiv="Content-Type" content="text/html">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><META name="description" content="The Legend widget displays labels and symbols for layers on the map"><meta name="content-language" content="en"><link href="rsrc/htmlhelp.css" rel="stylesheet" type="text/css"><title>Web AppBuilder for ArcGIS | Help - 
Legend
</title>
                <script type="text/javascript" language="JavaScript">
                    var pathL  = self.location.pathname.split ("/");
                    var fname = pathL[pathL.length-1];
                    var i = fname.lastIndexOf (".htm");
                    if (i>=0) {
                    fname = fname.substring (0, i)
                    } else {
                    //??
                    }
                    if (self.location.hash) {
				    		      fname = fname + self.location.hash;
						        }
                    self.location.replace ("../index.html#//" + fname);
                </script>
                </head><!--Publication GUID: [GUID-E7D1C130-8F87-4109-8D61-E73A46083F52]--><!--Topic GUID: [GUID-3B69814D-6464-4B57-873A-184C7A110691]--><body><div id="content"><div class="header"><h1>
Legend
</h1><div id="breadcrumb"></div></div>
<p id="GUID-DD627797-737C-4052-8795-D6A1595083A9">
The Legend widget displays labels and symbols for layers on the map. If specified, the legend respects scale dependencies, and only displays layers and sublayers visible on the current map. The legend automatically updates if the visibility of a layer or sublayer changes.
</p><p id="GUID-66F7A7D2-9660-4ADA-8A68-B0F9A40A7C14">The following table shows the descriptions of the configurable attributes.</p><p id="GUID-7B900C8C-170F-48C3-BEC2-B289C84CCC12"><div class="block_table" id="TABLE_B064BED3E0CB4CC797D265D7412B136A" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="*"></colgroup><colgroup width="*"></colgroup><tr purpose="thead"><th class="th" purpose="th" rowspan="1" colspan="1"><p id="GUID-F3B4167D-1E7B-44AC-A342-55A9609C4150">Attribute</p></th><th class="th" purpose="th" rowspan="1" colspan="1"><p id="GUID-8C305E3C-D4AB-4439-B417-9F772DDA9CF6">Description</p></th></tr><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-62D0BD7D-27F1-4266-9E0D-0DF062F1CBA0"><span class="usertext">legend</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-08A9FDF2-274A-4E6A-A7B3-C67F0204053A">An object of ArcGIS API for JavaScript. See the params of <a target="_blank" class="xref" href="https://developers.arcgis.com/javascript/3/jsapi/legend-amd.html#legend1" rel="https://developers.arcgis.com/javascript/3/jsapi/legend-amd.html#legend1">Legend Constructor</a>.</p><p id="GUID-501292A3-DA87-4FF0-BD1A-6C375D1357E8">Example: <div class="codeblock" purpose="codeblock"><div class="codeblockdesc" purpose="codeblockdesc"></div><div class="highlight"><pre><code>{
  &quot;legend&quot;:{
    &quot;arrangement&quot;: 0,
    &quot;autoUpdate&quot;: true,
    &quot;respectCurrentMapScale&quot;: true
  }
}
</code></pre></div>
</div></p></td></tr></tbody></table><span class="table_desc"></span></div></p>

<div class="footer"> Copyright © 1995-2016 Esri. All rights reserved. </div></div></body></html>